﻿@using ChinaHCM.QA.Site.Model;
@model RegisterModel
@{
    Layout = "~/Views/Shared/_OnlyName.cshtml";
    ViewBag.Title = "互动交流系统-注册";
}
@using (Html.BeginForm("Register", "Account", FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
{
    @Html.AntiForgeryToken()

    Dictionary<string, object> htmlAttributes = new Dictionary<string, object>();
    //htmlAttributes.Add("role", "form");
    <div class="row">&nbsp;
        </div>
    <div class="panel panel-default">
        <div class="panel-heading">
            用户注册
        </div>
        <div class="panel-body">
            <div class="form-group">@Html.ValidationSummary(true)</div>

            <div class="form-group">
                @Html.LabelFor(m => m.LoginName, new { @class = "col-sm-2 control-label" })
                <div class="col-sm-5">
                    @Html.TextBoxFor(m => m.LoginName, new { @class = "form-control", placeholder = "用户名" })
                </div>
                <div class="col-sm-5">
                    @Html.ValidationMessageFor(m => m.LoginName)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(m => m.Password, new { @class = "col-sm-2 control-label" })
                <div class="col-sm-5">
                    @Html.PasswordFor(m => m.Password, new { @class = "form-control", placeholder = "密码" })
                </div>
                <div class="col-sm-5">
                    @Html.ValidationMessageFor(m => m.Password)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(m => m.RePassword, new { @class = "col-sm-2 control-label" })
                <div class="col-sm-5">
                    @Html.PasswordFor(m => m.RePassword, new { @class = "form-control", placeholder = "密码确认" })
                </div>
                <div class="col-sm-5">
                    @Html.ValidationMessageFor(m => m.RePassword)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(m => m.RealName, new { @class = "col-sm-2 control-label" })
                <div class="col-sm-5">
                    @Html.TextBoxFor(m => m.RealName, new { @class = "form-control", placeholder = "真实姓名" })
                </div>
                <div class="col-sm-5">
                    @Html.ValidationMessageFor(m => m.RealName)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(m => m.NickName, new { @class = "col-sm-2 control-label" })
                <div class="col-sm-5">
                    @Html.TextBoxFor(m => m.NickName, new { @class = "form-control", placeholder = "昵称" })
                </div>
                <div class="col-sm-5">
                    @Html.ValidationMessageFor(m => m.NickName)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(m => m.Gender, new { @class = "col-sm-2 control-label" })
                <div class="col-sm-5">
                    @Html.EditorFor(m => m.Gender, new { @class = "form-control" })
                </div>
                <div class="col-sm-5">
                    @Html.ValidationMessageFor(m => m.Gender)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(m => m.UserEmail, new { @class = "col-sm-2 control-label" })
                <div class="col-sm-5">
                    @Html.TextBoxFor(m => m.UserEmail, new { @class = "form-control", placeholder = "Email" })
                </div>
                <div class="col-sm-5">
                    @Html.ValidationMessageFor(m => m.UserEmail)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(m => m.UserQuesion, new { @class = "col-sm-2 control-label" })
                <div class="col-sm-5">
                    @Html.TextBoxFor(m => m.UserQuesion, new { @class = "form-control", placeholder = "密码保护问题" })
                </div>
                <div class="col-sm-5">
                    @Html.ValidationMessageFor(m => m.UserQuesion)
                </div>
            </div>

            <div class="form-group">
                @Html.LabelFor(m => m.UserAnswer, new { @class = "col-sm-2 control-label" })
                <div class="col-sm-5">
                    @Html.TextBoxFor(m => m.UserAnswer, new { @class = "form-control", placeholder = "密码保护问题答案" })
                </div>
                <div class="col-sm-5">
                    @Html.ValidationMessageFor(m => m.UserAnswer)
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    @Html.HiddenFor(m => m.ReturnUrl)
                    <input type="submit" value=" 提交注册 " class="btn btn-primary" />
                    <input type="reset" value=" 重新填写 " class="btn btn-default" />
                </div>
            </div>
        </div>
    </div>
}